package com.Nuyoah.demo01.mappers;

import com.Nuyoah.demo01.DTO.CommunityDTO;
import com.Nuyoah.demo01.DTO.CommunityPageQry;
import com.Nuyoah.demo01.DTO.CommunityQry;
import com.Nuyoah.demo01.entity.Community;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

public interface CommunityMapper extends BaseMapper<Community> {
    //创建社区
    Integer createCommunity(CommunityDTO dto);
    //删除社区
    Integer deleteCommunity(Integer communityId);
    //修改社区信息
    Integer updateCommunity(CommunityQry qry);
    //分页查询社区信息
    List<Community> selectPageCommunity(CommunityPageQry qry);
    //查询全部社区信息
    List<Community> selectAllCommunity();

    //根据用户id查询某个用户创建的社区信息
    List<Community> selectCommunityByUserId(Integer userId);

    //根据id查询单个社区信息
    Community selectCommunityById(Integer communityId);

}
